package com.core.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.core.entity.BaseLookup;

@Entity
@Table(name = "lookup")
public class Lookup implements BaseLookup {
	// ------------Apartment Status-------------//
	public static final Lookup APARTMENT_CONSTRUCTSTATUS_ONAIR = new Lookup(1L);
	public static final Lookup APARTMENT_CONSTRUCTSTATUS_BUILT = new Lookup(2L);

	@Id
	@Column(name = "recid", unique = true, nullable = false)
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long recid;

	@Column(name = "name")
	private String name;

	@Column(name = "lookup_iype_id")
	private Long lookupTypeId;

	public Lookup() {
	}

	public Lookup(Long id) {
		this.recid = id;
	}

	public Lookup(Long id, String name) {
		this.recid = id;
		this.name = name;
	}

	public Long getRecid() {
		return recid;
	}

	public void setRecid(Long recid) {
		this.recid = recid;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getLookupTypeId() {
		return lookupTypeId;
	}

	public void setLookupTypeId(Long lookupTypeId) {
		this.lookupTypeId = lookupTypeId;
	}

	// -----------------------------------------------//

	public String getLabel() {
		return this.name;
	}

	public Long getValue() {
		return this.recid;
	}

}
